/**
 * 
 */
package com.example.appointment.util;

import android.content.Context;
import android.widget.Toast;

/**
 * Toast 工具类
 * @author Admin
 *
 */
public class ToastUtil {

	public static Toast mToast;

	public static void show(Context context, String info) {
		Toast.makeText(context, info, Toast.LENGTH_LONG).show();
	}

	public static void show(Context context, int info) {
		Toast.makeText(context, info, Toast.LENGTH_LONG).show();
	}

	/**
	 * Toast弹窗方法
	 *
	 * @param mContext
	 * @param text
	 * @param duration
	 */
	public static void showToast(Context mContext, String text, int duration) {
		if (mToast != null) {
			mToast.setText(text);
		} else {
			mToast = Toast.makeText(mContext, text, duration);
		}
		mToast.show();
	}
}
